% scribe: Tye Lidman
% lastupdate: 12 November 2005
% lecture: 20
% references: Durrett, Section 4.1
% title: Conditional Expectation
% keywords: conditional expectation, version, conditional probability, regular conditional distribution, bivariate normal, Jensen's Inequality, orthogonal projection
% end

\documentclass[12pt, letterpaper]{article}

\include{macros}

\begin{document}

\lecture{20}
{Conditional Probability}
{Tye Lidman}{tlid@berkeley.edu}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

These notes were partially adapted from the notes of Charles C.
Fowlkes from previous years.  Reference: \cite{durrett}, Section 4.1.

\section{Review}
% keywords: conditional expectation
% end

Recall that for a probability space $(\Omega, \F, P)$, a real r.v.\ 
$X \in L^1(\Omega, \F, P)$ (i.e.\ $\E |X| <\infty$), and sub-$\sigma$-field 
$\G \subset \F$, $\E(X|\G)$ is the (a.s.) unique r.v.\ $\hat{X}$ satisfying:
\begin{enumerate}
\item $\hat{X} \in \G$; and 
\item $\hat{X}$ integrates like $X$ over $\G$-sets; i.e.
\begin{equation}
\E(\hat{X}1_G)=\E(X1_G)  \mbox{ for all } G\in \G.
\label{condexpnprop2}
\end{equation}
\end{enumerate}

Note that you never have to check condition (\ref{condexpnprop2})
above for all $G\in\G$ because 
for any pair of random variables $X$ and $Y$ which are integrable, 
$\{G \mbox{ $|$ } \E(X1_G)=\E(Y1_G)\}$ is a $\lambda$ system (provided $\Omega\in\G$), so you only have to check (\ref{condexpnprop2}) for $G$ in a $\pi$-system which generates $\G$.

\ref{condexpnprop2} extends immediately to 
\begin{equation}
\E(\hat{X}Z)=\E(XZ) \mbox{ for $Z\in\G$ bounded}
\label{condexpnprop2'}
\end{equation} 
by the usual argument of taking linear combinations of indicators and passing 
to the limit via the dominated convergence theorem, since $c|X|$ is a 
dominating variable (where $c$ is the bound on $|Z|$).
This gives $\E(XZ)=\E(\E(X|\G)Z)$ since $Z$ and $\E(X|\G)$ are both 
$\G$-measurable, so $\hat{X}$ is a kind of projection of $X$ onto $\G$-measurable things. 

For $X\in L^2(\Omega, \F, P)$, $\hat{X}$ is the \emph{orthogonal projection} 
of $X$ onto $L^2(\Omega, F, P)$ (up to quibbles about equivalence relations of $\F$ and $\G$).  That is, 
(\ref{condexpnprop2'}) says $\E((X-\hat{X})Z)=0$ for all $Z\in L^2(\Omega, \F, P)$.  This is the definition of an orthogonal projection in a Hilbert space.  

Last time we proved the existence of $\E(X|\G)$ for $\G$ that are countably generated and $X\in L^2$ by letting $\hat{X}=\displaystyle\lim_{n\rightarrow \infty} \E(X|\G_n)$, with $\G_n\uparrow \G$.  What about $X\in L^1(\Omega, \F, P)$?

\section{Properties of Conditional Expectation}
% keywords: positive operator, Jensen's inequality, orthogonal projection in L^2, tower property of condtional expectation
% end

We record some basic properties of $\E(\cdot|\G)$ as an operator, $X\longmapsto \E(X|\G)$:

\begin{itemize}

\item{$\E(\cdot|\G)$ is positive: 
\[Y \geq 0 \Rightarrow \E(Y|\G) \geq 0\]
}
\item{ $\E(\cdot|\G)$ is linear: 
\[\E(aX + bY | \G) = a\E(X|\G) + b\E(Y|\G)\]
}
\item{$\E(\cdot|\G)$ is a projection: 
\[\E(\E(X|\G)|\G) = \E(X|\G)\]
}
\item{$\E(\cdot|\G)$ is continuous with norm $1$ in any of the usual $\L^p$ spaces for $p\geq 1$: 
\[\| \E(X|\G) \|_p \leq \|X\|_p\]
and
\[X_n \ltcv X \mbox{ implies } \E(X_n|\G) \ltcv \E(X|\G)\]
}
\item{ Conditional expectation has the tower property. If $\H \subset \G$ 
then:
\[\E(\E(X|\G)|\H) = \E(\E(X|\H)\G) = \E(X|\H)\]
}
\item{$\E(\cdot|\G)$ commutes with multiplication by $\G$-measurable variables: 
\[\E(XY|\G) = E(X|\G)Y \mbox{ for } \E|XY| < \infty \mbox{ and } Y \in \G\]
}
\item{$\E(\cdot|\G)$ respects monotone convergence:
\[0 \leq X_n \uparrow X \mbox{ implies } \E(X_n|\G) \uparrow \E(X|\G)\]
}
\item{If $\phi$ is convex and $\E|\phi(X)| < \infty$ then
a conditional form of Jensen's inequality holds: 
\[\phi(\E(X|\G) \leq \E(\phi(X)|\G)\]
}
\item{As before, $\E(\cdot|\G)$ is an orthogonal projection in $\L^2$: 
\[\E((X-\hat{X})Z)=0 \mbox{ for all } Z \in L^2(\Omega,\F,\P)\]
}
\item{\emph{Repeated Conditioning}: for $\G_0 \subset \G_1 \subset
\ldots$, $\G_\infty = \sigma(\cup \G_i)$ and $X \in \L^p$ with
$p \geq 1$,
\[\E(X|\G_n) \ascv \E(X|\G_\infty)\]
\[\E(X|\G_n) \lpcv \E(X|\G_\infty)\]
}

\end{itemize}

\section{Conditioning on Random Variables}
% conditional distribution, bivariate normal
% end

Take $\G = \sigma(Y)$ for some random variable $Y$.  Recall that $Z$ is $\sigma(Y)$ is measurable if and only if $Z=\phi(Y)$ for some Borel-measurable function $\phi$.
We will use the notation $\E(X|\sigma(Y))=\phi(Y)$.  We read this in two ways.  $E(X|\sigma(Y))$ is a random variable on $(\Omega,\F,P)$ and $E(X|\sigma(Y))$ is some function of $Y$, as the notation suggests.  
 
\begin{example} (Baby Bivariate Normal)  \upshape If $X$ and $Y$ are bivariate normal $(X,Y) \deq (X,X\cos\theta + Z\sin\theta)$, with $\cos\theta = \rho$, and $X,Z$ i.i.d. $N(0,1)$, then:
\[\E X=\E Y=0\]
\[\E X^2=\E Y^2=1\]
\[\E (XY)=\rho =\mbox {correlation of $X$ and $Y$}\]
\[\E (Y|X)=\rho X\]
\[\E (X|Y)=\rho Y\]
\end{example}

Notice that if $(X',Y')\deq(X,Y)$ then $\E(X|Y)=\phi(Y)$, $\E(X'|Y')=\phi(Y')$.

\section{Relation to Undergraduate Probability}
% keywords: conditional density, regular conditional distribution
% end

If $(X,Y)$ has joint density $f(x,y)$ with respect to Lebesgue measure 
$dx\,dy$, 
%
$$\P(X\in dx,Y\in dy)=f(x,y)\,dx\,dy.$$  
%
This means $\E(g(X,Y))=\int_{\R}\int_{\R}g(x,y)f(x,y)\,dx\,dy$ for all $g\geq0$ or $g$ bounded.
We let the density of $X$ be $\P(X\in dx)=f_X(x)\,dx$ and the density of $Y$ be $\P(Y\in dy)=f_Y(y)\,dy$.  Then this means that $f_X(x)=\int f(x,y)\,dy$ and $f_Y(y)=\int f(x,y)\,dx$.

Now for all $y$ with $f_Y(y) > 0$, we can define:
\begin{equation*}
f_{X|Y=y}(x)=\frac{f(x,y)}{f_Y(y)} \geq 0 \mbox{, with }\int f_{X|Y=y}(x)\,dx=1
\end{equation*}

This is the ``formal'' conditional density of $X$ given $Y=y$.  We can relate this to $\E(X|Y)=\phi(Y)$ by defining $\phi(y)$ as
\begin{equation*}
\phi (y)= \left\{
\begin{array}{lr}
\int x \frac{f(x,y)}{f_Y(y)}dx & \mbox{ if } f_Y(y)>0\\
0 & \mbox{ if } f_Y(y)=0
\end{array}
\right. .
\end{equation*}

We must check that this is measurable with respect to $\sigma(Y)$: this 
follows from part of Fubini's theorem.  
Also, we need to check that $\E(\phi(Y) h(Y))=\E(Xh(Y))$ for $h$ measurable.

In the same setting, we can let $\E(k(X)|Y)=\phi_k(Y)$.  $\phi_k(y)$ is defined by
simply replacing $x$ with $k(x)$:
%
\begin{equation*}
\phi _k(y)= \left\{
\begin{array}{lr}
\int k(x) \frac{f(x,y)}{f_Y(y)} dy & \mbox{ if } f_Y(y)>0\\
0 & \mbox{ if } f_Y(y)=0
\end{array}
\right. .
\end{equation*}
%
In this setup, the expectation of any $k(X)$ given $Y$ can be obtained by integration with respect to a regular conditional distribution,
which is a distribution of $X$ that depends on the value of $Y$.  Here, given $Y=y$, we have the density $f_{X|Y=y}(x)=f(x,y)/f_Y(y)$.

\bibliographystyle{plain}
\bibliography{../books.bib}

\end{document}
